#!/usr/bin/python

import pygtk
pygtk.require('2.0')
import gtk
import os
import gobject
import gettext

from common.widgets import EntryBox, ListPack, TweakPage
#from common.systeminfo import SystemInfo

class llx_vars(TweakPage):
    """Some options about current user"""
    def __init__(self):
        TweakPage.__init__(self)

      #  box = ListPack(_("System information"),(
       #             EntryBox(_("Hostname"),        os.uname()[1]),
        #            EntryBox(_("Distribution"),     SystemInfo.distro),
         #           EntryBox(_("Desktop environment"),     SystemInfo.gnome),
          #          EntryBox(_("Kernel"),         os.uname()[0]+" "+os.uname()[2]),
           #         EntryBox(_("Platform"),     os.uname()[-1]),

            #    ))

       # montar = (
        #          EntryBox(("Hostname"),        os.uname()[1]),

         #       )

       # montar = montar + (
        #           EntryBox(("HELO"),        os.uname()[1]),
         #          )
        montar = ( )
        #data=[]
        filellx=open('LLXVARS',"r")
        tmpfile=filellx.readlines()
        filellx.close()
        for cline in tmpfile:
            line = cline.replace('\n','')
            LLXVARNAME = line.split('=')[0]
            LLXVARVALUE = line.split('=')[1]
            #print LLXVARNAME
            #print LLXVARVALUE
            montar = montar + (
                               EntryBox((LLXVARNAME), LLXVARVALUE),
                               )


        #print montar

        box = ListPack(("Current LLiureX vars"),(montar))
        self.pack_start(box, False, False, 0)

if __name__ == "__main__":
    from utility import Test
    Test(llx_vars)
